package com.example.controller;

import com.example.service.StorageServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
public class StorageController {
    @Autowired
    private StorageServiceImpl service;
    @PutMapping("/modifiedStorage/{productId}/{used}")
    public Boolean modifiedStorage(@PathVariable("productId") Long productId,@PathVariable("used") int used){
        int i = service.modifiedStorage(productId, used);
        if(i>0){
            return true;
        }else {
            return false;
        }
    }
}
